package com.yqd.d2_inheritance;

public class People {
    private String name;
    protected Integer age=20;

    public People() {
        System.out.println("父类的无参构造");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public void sleep() {
        System.out.println("睡觉");
    }
}
